import React, { PureComponent } from "react"
import Styles from '@/scss/lefts.scss'
import IconStyles from "@/font_icon/iconfont.css"
//左边搜索组件
class Search extends PureComponent<Iprops, any>{
  render() {
    return (
      <div className={Styles.search}>
        <i className={`${IconStyles.iconfont} ${IconStyles.icon_sousuo}`}></i>
        <input type="text" placeholder="搜索内容或时间" onKeyDown={(e) => this.props.onSearch(e)} onChange={(e) =>  this.props.onSearch(e)} />
      </div>
    )
  }

}
//传入的搜索函数
type Iprops={
  onSearch:(e:any)=>void
}

export default Search




